const tencentCall = {
  state: {
    callShow: 0,  //显示隐藏
    callState: 0, //通话状态，0：待机，1：通话中 3:拒绝
    isCall:0,     //是否来电，1：拨打，2：来电
    isDial:0,     //拨打状态
  },
  mutations: {
    //显示隐藏
    SET_CALLSHOW: (state, data) => {
      state.callShow = data;
    },
    SET_CALLSTATE: (state, data) => {
      state.callState = data;
    },
    SET_ISCALL: (state, data) => {
      state.isCall = data;
    },
    //来电
    SET_ISDIAL: (state, data) => {
      state.isDial = data;
    },

  },

  actions: {
    setCallShow({ commit }, data) {
      commit("SET_CALLSHOW", data);
    },
    setCallState({ commit }, data) {
      commit("SET_CALLSTATE", data);
    },
    setIsCall({ commit }, data) {
      commit("SET_ISCALL", data);
    },
    setIsDial({ commit }, data) {
      commit("SET_ISDIAL", data);
    },
  }
};

export default tencentCall;
